//战役Scene

var campaignScene = {
	scene : null,
	backgroundlayer : null,
	battlelayer : null,
	canvaslayer : null,
	controllayer : null,
	
	resource : [
	    resource.footman_standby_wav,
	    resource.tank_move_wav,
		resource.Layout_plist,
		resource.Layout_png,
		resource.flag_png,
		resource.white1010_png,
	    resource.flags_plist,
        resource.flags_png,
        resource.units_aura_png,
        resource.units_tank_png,
        resource.units_footman_png,
        resource.units_cannon_png,
        resource.units_motor_png,
        resource.units_flak_png,
        resource.units_cavalry_png,
        resource.tiles_grass_plist,
        resource.tiles_grass_png,
        resource.tiles_forest_plist,
        resource.tiles_forest_png,
        resource.tiles_urban_plist,
        resource.tiles_urban_png,
        resource.tiles_river_plist,
        resource.tiles_river_png
    ],

    Create : function() {
    	this.scene = new cc.Scene();

    	cc.spriteFrameCache.addSpriteFrames(resource.SysMenu_plist);
    	cc.spriteFrameCache.addSpriteFrames(resource.Layout_plist);
    	
    	for (var idx in onCampaignSceneCreate)
    		onCampaignSceneCreate[idx]();
    	
    	var winSize = cc.director.getWinSize();
    	
    	this.backgroundlayer = new BackgroundLayer();
    	this.scene.addChild(this.backgroundlayer,0);
    	
    	this.controllayer = new ControlLayer();
    	this.scene.addChild(this.controllayer,3);
    	
    	this.canvaslayer = new CanvasLayer(true);
    	this.canvaslayer.setCloseMenuVisible(false);
    	this.scene.addChild(this.canvaslayer, 2);

    	this.battlelayerBBox = {left: 0, bottom: 0, right: winSize.width, top: winSize.height};
    	this.battlelayer = new BattleLayer();
    	this.scene.addChild(this.battlelayer,1);
    	
    	for (var idx in onCampaignSceneLoaded)
    		onCampaignSceneLoaded[idx]();
    	
    	return this.scene;
    }
};